<template>
  <div>
    <el-date-picker
      v-model="day"
      type="date"
      placeholder="选择日期"
    
      value-format="yyyy-MM-dd">
    </el-date-picker>
    <el-button type="primary" :disabled="disable" @click="create()">生成数据</el-button>
  </div>
</template>

<script>
import statistics from '../../../api/edu/statistics'
export default {
    data(){
        return{
            day:'',
            disable:false
        }
    },
    methods:{
        create(){
            statistics.createStatisticsByDay(this.day).then(res=>{
                this.$message({
                message: '生成数据成功',
                type: 'success'
                });
                this.disable = true
                this.$router.push({path:'/edu/statistics/show'})
            })

        }
    }
}
</script>

<style>

</style>